from re import I
from django.shortcuts import render

# Create your views here.


from django.views.generic import TemplateView,ListView,DetailView
from .models import Post

class Index(ListView):
    queryset = Post.objects.all()
    template_name = 'blog/index.html'
    context_object_name = 'posts'


class Detail(DetailView):
    template_name = 'blog/detail.html'
    context_object_name = 'post'
    queryset = Post.objects.all()



